#include<iostream>
using namespace std;
int main ()
{
    int n,n2;
    int i;
    i=0;
    cin>>n;
    i=i+n;
    cin>>n2;
    i=i+n2;
    while (n2>=n)
    {

        cin>>n2;
        i=i+n2;


    }
    cout<<endl<<i;


    return 1;
}
